<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<script type="text/javascript" src="js/jquery.itextclear.js"></script>
<script type="text/javascript">
    $(document)
            .ready(
            function () {
                $(
                        'input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea',
                        '.form').iTextClear();
            });
</script>
<!-- jQplot CSS -->

<link rel="stylesheet" media="screen" href="${ctx}/css/Tree.css"/>
<!-- jQplot CSS END -->

<!-- DATATABLES CSS -->
<link rel="stylesheet" media="screen" href="lib/datatables/css/vpad.css"/>
<script type="text/javascript"
        src="lib/datatables/js/jquery.dataTables.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#example').dataTable({
            "sPaginationType":"full_numbers"
        });
    });
</script>
<!-- DATATABLES CSS END -->

<script>
    $(document).ready(function () {
        $('#simple-button').popover('#simple-popover', {});
        $('#top-button').popover('#top-popover', {
            preventLeft:true,
            preventRight:true,
            preventBottom:true
        });
    });
</script>

<h1 class="page-title">新员工面试</h1>

<div class="container_12 clearfix">
<section class="tabs grid_12 leading">
<ul class="clearfix">
    <li><a href="#" class="current">基础资料</a></li>
    <li><a href="#">教育情况</a></li>
    <li><a href="#">培训情况</a></li>
    <li><a href="#">工作经历</a></li>
    <li><a href="#">家庭情况</a></li>
</ul>
<section>

    <DIV class="portlet">
        <header>
            <h5_n>${employeeinfoBase.name}</h5_n>
            <h2><s:if test="#request.employeeinfoBase.sex.toString() == \"0\"">先生</s:if><s:else>女士</s:else></h2>
        </header>
    </DIV>

    <section class="clearfix" style="display: block;">


        <Div class="grid_3 leading">

            <dl>
                <dt>出生年月</dt>
                <dd><fmt:formatDate value="${employeeinfoBase.birthday}" pattern="yyyy-MM-dd"></fmt:formatDate></dd>
                <dt>身高</dt>
                <dd>${employeeinfoBase.stature}</dd>
                <dt>体重</dt>
                <dd>${employeeinfoBase.avoirdupois}</dd>
                <dt>邮箱</dt>
                <dd>${employeeinfoBase.email}</dd>
                <dt>英语阅读</dt>
                <dd>${employeeinfoBase.englishRead}</dd>
                <dt>英语书写</dt>
                <dd>${employeeinfoBase.englishWrite}</dd>
                <dt>英语会话</dt>
                <dd>${employeeinfoBase.englishDialog}</dd>
            </dl>

        </Div>

        <Div class="grid_3 leading">

            <dl>
                <dt>户籍地址</dt>
                <dd>${employeeinfoBase.census}</dd>
                <dt>档案所在地</dt>
                <dd>${employeeinfoBase.archives}</dd>
                <dt>联系地址</dt>
                <dd>${employeeinfoBase.address}</dd>
                <dt>手机</dt>
                <dd>${employeeinfoBase.handSet}</dd>
                <dt>其他语言阅读</dt>
                <dd>${employeeinfoBase.languageRead}</dd>
                <dt>其他语言书写</dt>
                <dd>${employeeinfoBase.languageWrite}</dd>
                <dt>其他语言会话</dt>
                <dd>${employeeinfoBase.languageDialog}</dd>

            </dl>

        </Div>

        <Div class="grid_3 leading">

            <dl>
                <dt>身份证</dt>
                <dd>${employeeinfoBase.idcard}</dd>
                <dt>左眼视力</dt>
                <dd>${employeeinfoBase.eyeLeft}</dd>
                <dt>电话</dt>
                <dd>${employeeinfoBase.tel}</dd>
                <dt>婚否</dt>
                <dd>${employeeinfoBase.marry}</dd>
                <dt>英语证书</dt>
                <dd>${employeeinfoBase.englishLetter}</dd>
                <dt>子女</dt>
                <dd>${employeeinfoBase.baby}</dd>
                <dt>员工状态</dt>
                <dd>
                    <s:if test="#request.employeeinfoBase.state == null || #request.employeeinfoBase.state.toString().equals('3')">人才库</s:if>
                    <s:elseif test="#request.employeeinfoBase.state.toString().equals('1')">在职员工</s:elseif>
                    <s:else>离职员工</s:else>
                </dd>
            </dl>

        </Div>

        <Div class="grid_3 leading">

            <dl>
                <dt>名族</dt>
                <dd>${employeeinfoBase.folk}</dd>
                <dt>右眼视力</dt>
                <dd>${employeeinfoBase.eyeRight}</dd>
                <dt>住所邮编</dt>
                <dd>${employeeinfoBase.postcode}</dd>
                <dt>薪资</dt>
                <dd>${employeeinfoBase.compensation}</dd>
                <dt>学历</dt>
                <dd>${employeeinfoBase.certificate}</dd>
                <dt>其他说明事项</dt>
                <dd>${employeeinfoBase.remark}</dd>
            </dl>

        </Div>


    </section>
    <section class="clearfix" style="display: none;">
        <header class="grid_12 alpha omega"></header>
        <Div class="grid_12 leading">
            <div class="message success ">
                <h3>教育经历</h3>
                <s:iterator value="#request.employeeinfoEducations" var="edu" status="st">
                    <p>${edu.schoolName} , ${edu.degree} , ${edu.specialty}</p>

                    <p><fmt:formatDate value="${edu.beginDate}" pattern="yyyy年-MM月"></fmt:formatDate>
                        -<fmt:formatDate value="${edu.endDate}" pattern="yyyy年-MM月"></fmt:formatDate>
                        (${edu.diffMon})</p>
                </s:iterator>

            </div>
        </Div>
    </section>
    <section class="clearfix" style="display: none;">

        <Div class="grid_12 leading">
            <div class="message info">
                <h3>培训经历</h3>

                <s:iterator value="#request.employeeinfoTrains" var="train" status="st">
                    <p>${train.letter} , ${train.trainAddress} , ${train.trainContent}</p>

                    <p><fmt:formatDate value="${train.beginDate}" pattern="yyyy年-MM月"></fmt:formatDate>
                        -<fmt:formatDate value="${train.endDate}" pattern="yyyy年-MM月"></fmt:formatDate>
                        (${train.diffMon})</p>
                </s:iterator>
            </div>
        </Div>

    </section>
    <section class="clearfix" style="display: none;">
        <Div class="grid_12 leading">
            <div class="message warning">
                <h3>工作经历</h3>

                <s:iterator value="#request.employeeWorkExperiences" var="exp" status="st">
                    <p>${exp.job}</p>

                    <p>${exp.compname}</p>

                    <p><fmt:formatDate value="${exp.beginDate}" pattern="yyyy年-MM月"></fmt:formatDate>
                        -<fmt:formatDate value="${exp.endDate}" pattern="yyyy年-MM月"></fmt:formatDate>
                        (${exp.diffMon})</p>

                    <p>月薪:${exp.monthlyPay}</p>

                    <p>证明人: ${exp.proveMan}</p>

                    <p>联系电话: ${exp.contel}</p>

                    <p>离职原因: ${exp.resignReason}</p>
                </s:iterator>
            </div>
        </Div>
    </section>
    <section class="clearfix" style="display: none;">
        <s:iterator value="#request.employeeinfoFamilies" var="family" status="st">
            <Div class="grid_3 leading">
                <dl>
                    <dt>家庭关系</dt>
                    <dd>${family.familyRelation}</dd>
                    <dt>紧急联系人</dt>
                    <dd>${family.exigenceConname}</dd>
                </dl>
            </Div>

            <Div class="grid_3 leading">
                <dl>
                    <dt>工作单位</dt>
                    <dd>${family.compname}</dd>
                    <dt>紧系联系人关系</dt>
                    <dd>${family.exigenceRelation}</dd>
                </dl>
            </Div>

            <Div class="grid_3 leading">
                <dl>
                    <dt>姓名</dt>
                    <dd>${family.name}</dd>
                    <dt>紧急联系人电话</dt>
                    <dd>${family.contel}</dd>
                </dl>
            </Div>

            <Div class="grid_3 leading">
                <dl>
                    <dt>住宅地址</dt>
                    <dd>${family.address}</dd>
                </dl>
            </Div>

        </s:iterator>
    </section>
</section>
</section>


<div class="tabs side grid_12 leading" style="margin-top: 0px">

    <div class="clear"></div>
    <div class="grid_12"></div>


</div>
</div>

<div class="container_12 clearfix leading">
<section class="tabs side grid_12 leading">
<ul class="clearfix">
    <li><a href="#"
           <s:if test="#request.signViewType == \"fv\"">class="current"</s:if> >初试</a></li>
    <li><a href="#" <s:if test="#request.signViewType == \"rv\"">class="current"</s:if>>复试</a></li>
</ul>
<section>
<!-- 初试 -->
<s:if test="#request.signViewType == \"fv\"">
<section class="clearfix" style="display: block;">
</s:if>
<s:else>
<section class="clearfix" style="display: none;">
</s:else>
<header class="grid_12 alpha omega">
    <h2>人事评核项目</h2>
</header>
<div class="grid_12">
<form class="form has-validation" id="post_first_form">
<s:if test="#request.interviewArrangeId > 0">
    <input type="hidden" value="${interviewArrangeId}"
           name="interviewFirst.interviewArrange.id"/>
</s:if>

<s:if test="#request.interviewFirst != null">
    <input type="hidden" value="${interviewFirst.id}"
           name="interviewFirst.id"/>
</s:if>
<div class="clearfix">

    <label class="form-label" for="first_personality">性格测试 <em>*</em></label>

    <div class="form-input">
        <input type="text" id="first_personality" name="interviewFirst.personality"
               required="required" placeholder="填写分数" value="${interviewFirst.personality}"/>
    </div>

</div>

<div class="clearfix">

    <label class="form-label" for="first_writtenXamination">笔试分数 <em>*</em></label>

    <div class="form-input">
        <input type="email" id="first_writtenXamination" name="interviewFirst.writtenXamination"
               required="required"
               placeholder="填写分数" value="${interviewFirst.writtenXamination}"/>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">证件原件核对</label>

    <div class="form-input">
        <div class="radiogroup">
            <label><input type="radio" name="interviewFirst.certificate" value="pass_audit"
                          <s:if test="#request.interviewFirst.certificate != null && #request.interviewFirst.certificate.toString() == \"pass_audit\"">checked="checked"</s:if> />通过</label>
            <label><input type="radio" name="interviewFirst.certificate" value="reject_audit"
                          <s:if test="#request.interviewFirst.certificate != null && #request.interviewFirst.certificate.toString() == 'reject_audit'">checked="checked"</s:if> />未通过</label>
        </div>
    </div>
</div>

<div class="clearfix">

    <label class="form-label">面试时间是否准时 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label><input type="radio" name="interviewFirst.interviewOntime"
                          value="on_time"
                          <s:if test="#request.interviewFirst.interviewOntime != null && #request.interviewFirst.interviewOntime.toString() == 'on_time'">checked="checked"</s:if>/>
                准时</label> <label><input
                type="radio" name="interviewFirst.interviewOntime" value="un_on_time"
                <s:if test="#request.interviewFirst.interviewOntime != null && #request.interviewFirst.interviewOntime.toString() == 'un_on_time'">checked="checked"</s:if>/>
            迟到</label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">仪容、礼貌、衣着整洁
        <em>*</em>
    </label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewFirst.appearance" value="excellent"
                           <s:if test="#request.interviewFirst.appearance != null && #request.interviewFirst.appearance.toString() == 'excellent'">checked="checked"</s:if> />
                极佳
            </label> <label> <input type="radio" name="interviewFirst.appearance" value="good"
                                    <s:if test="#request.interviewFirst.appearance != null && #request.interviewFirst.appearance.toString() == 'good'">checked="checked"</s:if>/>
            佳
        </label> <label> <input type="radio" name="interviewFirst.appearance" value="average"
                                <s:if test="#request.interviewFirst.appearance != null && #request.interviewFirst.appearance.toString() == 'average'">checked="checked"</s:if>/>
            平实
        </label> <label> <input type="radio" name="interviewFirst.appearance" value="less"
                                <s:if test="#request.interviewFirst.appearance != null && #request.interviewFirst.appearance.toString() == 'less'">checked="checked"</s:if>/>
            尚佳
        </label> <label> <input type="radio" name="interviewFirst.appearance" value="poor"
                                <s:if test="#request.interviewFirst.appearance != null && #request.interviewFirst.appearance.toString() == 'poor'">checked="checked"</s:if>/>
            略差
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">健康与精神 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewFirst.exuberance" value="excellent"
                           <s:if test="#request.interviewFirst.exuberance != null && #request.interviewFirst.exuberance.toString() == 'excellent'">checked="checked"</s:if>/>
                极佳
            </label> <label> <input type="radio" name="interviewFirst.exuberance" value="good"
                                    <s:if test="#request.interviewFirst.exuberance != null && #request.interviewFirst.exuberance.toString() == 'good'">checked="checked"</s:if>/>
            佳
        </label> <label> <input type="radio" name="interviewFirst.exuberance" value="average"
                                <s:if test="#request.interviewFirst.exuberance != null && #request.interviewFirst.exuberance.toString() == 'average'">checked="checked"</s:if>/>
            普通
        </label> <label> <input type="radio" name="interviewFirst.exuberance" value="less"
                                <s:if test="#request.interviewFirst.exuberance != null && #request.interviewFirst.exuberance.toString() == 'less'">checked="checked"</s:if>/>
            稍差
        </label> <label> <input type="radio" name="interviewFirst.exuberance" value="poor"
                                <s:if test="#request.interviewFirst.exuberance != null && #request.interviewFirst.exuberance.toString() == 'poor'">checked="checked"</s:if>/>
            不佳
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">口齿清晰、发音标准 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewFirst.enunciation" value="excellent"
                           <s:if test="#request.interviewFirst.enunciation != null && #request.interviewFirst.enunciation.toString() == 'excellent'">checked="checked"</s:if>/>
                极佳
            </label> <label> <input type="radio" name="interviewFirst.enunciation" value="good"
                                    <s:if test="#request.interviewFirst.enunciation != null && #request.interviewFirst.enunciation.toString() == 'good'">checked="checked"</s:if>/>
            佳
        </label> <label> <input type="radio" name="interviewFirst.enunciation" value="average"
                                <s:if test="#request.interviewFirst.enunciation != null && #request.interviewFirst.enunciation.toString() == 'average'">checked="checked"</s:if>/>
            普通
        </label> <label> <input type="radio" name="interviewFirst.enunciation" value="less"
                                <s:if test="#request.interviewFirst.enunciation != null && #request.interviewFirst.enunciation.toString() == 'less'">checked="checked"</s:if>/>
            稍差
        </label> <label> <input type="radio" name="interviewFirst.enunciation" value="poor"
                                <s:if test="#request.interviewFirst.enunciation != null && #request.interviewFirst.enunciation.toString() == 'poor'">checked="checked"</s:if>/>
            不佳
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">评价 <em>*</em></label>

    <div class="form-input form-textarea">
        <textarea id="first_appraise" name="interviewFirst.appraise" required="required" rows="5"
                  placeholder="请填写评价">${interviewFirst.appraise}</textarea>
    </div>

</div>
<div class="clearfix">

    <label class="form-label">评价结果 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewFirst.appraiseResult" value="retrial_exam"
                           <s:if test="#request.interviewFirst.appraiseResult != null && #request.interviewFirst.appraiseResult.toString() == 'retrial_exam'">checked="checked"</s:if> />
                建议复试
            </label> <label> <input type="radio" name="interviewFirst.appraiseResult" value="not_re_exam"
                                    <s:if test="#request.interviewFirst.appraiseResult != null && #request.interviewFirst.appraiseResult.toString() == 'not_re_exam'">checked="checked"</s:if>/>
            不建议复试
        </label> <label> <input type="radio" name="interviewFirst.appraiseResult" value="advice_job"
                                <s:if test="#request.interviewFirst.appraiseResult != null && #request.interviewFirst.appraiseResult.toString() == 'advice_job'">checked="checked"</s:if>/>
            建议岗位
        </label> <label> <input type="radio" name="interviewFirst.appraiseResult" value="deleted_directly"
                                <s:if test="#request.interviewFirst.appraiseResult != null && #request.interviewFirst.appraiseResult.toString() == 'deleted_directly'">checked="checked"</s:if>/>
            直接删除
        </label>
        </div>
    </div>

</div>

<div class="clearfix">
    <label class="form-label">面试岗位</label>
    <div class="form-input">
        <span class="form-label">${interviewArrange.duty.dutyName}</span>
    </div>
</div>
<div class="clearfix">

    <label class="form-label">建议职务职级</label>

    <div class="form-input">
        <select style="opacity: 0;" id="first_gv_sel" name="interviewFirst.grade.id">
            <s:iterator value="#request.gradeLvs" var="grade" status="st">
                <s:if test="#request.interviewFirst.grade == null && #st.index ==0">
                    <option value="${grade.id}" selected="selected">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
                </s:if>
                <s:elseif test="#request.interviewFirst.grade.id == #grade.id">
                    <option value="${grade.id}" selected="selected">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
                </s:elseif>
                <s:else>
                    <option value="${grade.id}">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
                </s:else>
            </s:iterator>
        </select>
    </div>

</div>
<s:if test="#request.signViewType == 'fv'">
    <div class="form-action clearfix">
        <button type="button" class="button" onclick="checkInterviewFirstForm()">提交</button>
        <button type="reset" class="button">重置</button>
    </div>
</s:if>
</form>
</div>
</section>

<!--复试-->
<s:if test="#request.signViewType == \"rv\"">
<section class="clearfix" style="display: block;">
</s:if>
<s:else>
<section class="clearfix" style="display: none;">
</s:else>
<header class="grid_12 alpha omega">
    <h2>用人单位评核项目</h2>
</header>

<div class="grid_12">
<form class="form has-validation" id="post_retrial_form">
<s:if test="#request.interviewArrangeId > 0">
    <input type="hidden" value="${interviewArrangeId}"
           name="interviewRetrial.interviewArrange.id"/>
</s:if>
<s:if test="#request.interviewRetrial != null">
    <input type="hidden" value="${interviewRetrial.id}"
           name="interviewRetrial.id"/>
</s:if>
<div class="clearfix">

    <label class="form-label">表达程度 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.expression" value="excellent"
                           <s:if test="#request.interviewRetrial.expression != null && #request.interviewRetrial.expression.toString() == 'excellent'">checked="checked" </s:if> />
                极佳
            </label> <label> <input type="radio" name="interviewRetrial.expression" value="good"
                                    <s:if test="#request.interviewRetrial.expression != null && #request.interviewRetrial.expression.toString() == 'good'">checked="checked" </s:if>/>
            优越
        </label> <label> <input type="radio" name="interviewRetrial.expression" value="average"
                                <s:if test="#request.interviewRetrial.expression != null && #request.interviewRetrial.expression.toString() == 'average'">checked="checked" </s:if>/>
            普通
        </label> <label> <input type="radio" name="interviewRetrial.expression" value="less"
                                <s:if test="#request.interviewRetrial.expression != null && #request.interviewRetrial.expression.toString() == 'less'">checked="checked" </s:if>/>
            稍差
        </label> <label> <input type="radio" name="interviewRetrial.expression" value="poor"
                                <s:if test="#request.interviewRetrial.expression != null && #request.interviewRetrial.expression.toString() == 'poor'">checked="checked" </s:if>/>
            不佳
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">机敏、反应程度 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.astute" value="excellent"
                           <s:if test="#request.interviewRetrial.astute != null && #request.interviewRetrial.astute.toString() == 'excellent'">checked="checked" </s:if>/>
                极佳
            </label> <label> <input type="radio" name="interviewRetrial.astute" value="good"
                                    <s:if test="#request.interviewRetrial.astute != null && #request.interviewRetrial.astute.toString() == 'good'">checked="checked" </s:if>/>
            优越
        </label> <label> <input type="radio" name="interviewRetrial.astute" value="average"
                                <s:if test="#request.interviewRetrial.astute != null && #request.interviewRetrial.astute.toString() == 'average'">checked="checked" </s:if>/>
            一般
        </label> <label> <input type="radio" name="interviewRetrial.astute" value="less"
                                <s:if test="#request.interviewRetrial.astute != null && #request.interviewRetrial.astute.toString() == 'less'">checked="checked" </s:if>/>
            迟钝
        </label> <label> <input type="radio" name="interviewRetrial.astute" value="poor"
                                <s:if test="#request.interviewRetrial.astute != null && #request.interviewRetrial.astute.toString() == 'poor'">checked="checked" </s:if>/>
            不佳
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">情绪稳定程度 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.emotionality" value="excellent"
                           <s:if test="#request.interviewRetrial.emotionality != null && #request.interviewRetrial.emotionality.toString() == 'excellent'">checked="checked" </s:if>/>
                甚佳
            </label> <label> <input type="radio" name="interviewRetrial.emotionality" value="good"
                                    <s:if test="#request.interviewRetrial.emotionality != null && #request.interviewRetrial.emotionality.toString() == 'good'">checked="checked" </s:if>/>
            安详
        </label> <label> <input type="radio" name="interviewRetrial.emotionality" value="average"
                                <s:if test="#request.interviewRetrial.emotionality != null && #request.interviewRetrial.emotionality.toString() == 'average'">checked="checked" </s:if>/>
            适当
        </label> <label> <input type="radio" name="interviewRetrial.emotionality" value="less"
                                <s:if test="#request.interviewRetrial.emotionality != null && #request.interviewRetrial.emotionality.toString() == 'less'">checked="checked" </s:if>/>
            不足
        </label> <label> <input type="radio" name="interviewRetrial.emotionality" value="poor"
                                <s:if test="#request.interviewRetrial.emotionality != null && #request.interviewRetrial.emotionality.toString() == 'poor'">checked="checked" </s:if>/>
            缺乏
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">自信心程度 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.selfConfidence" value="excellent"
                           <s:if test="#request.interviewRetrial.selfConfidence != null && #request.interviewRetrial.selfConfidence.toString() == 'excellent'">checked="checked" </s:if>/>
                完美
            </label> <label> <input type="radio" name="interviewRetrial.selfConfidence" value="good"
                                    <s:if test="#request.interviewRetrial.selfConfidence != null && #request.interviewRetrial.selfConfidence.toString() == 'good'">checked="checked" </s:if>/>
            充足
        </label> <label> <input type="radio" name="interviewRetrial.selfConfidence" value="average"
                                <s:if test="#request.interviewRetrial.selfConfidence != null && #request.interviewRetrial.selfConfidence.toString() == 'average'">checked="checked" </s:if>/>
            普通
        </label> <label> <input type="radio" name="interviewRetrial.selfConfidence" value="less"
                                <s:if test="#request.interviewRetrial.selfConfidence != null && #request.interviewRetrial.selfConfidence.toString() == 'less'">checked="checked" </s:if>/>
            不足
        </label> <label> <input type="radio" name="interviewRetrial.selfConfidence" value="poor"
                                <s:if test="#request.interviewRetrial.selfConfidence != null && #request.interviewRetrial.selfConfidence.toString() == 'poor'">checked="checked" </s:if>/>
            缺乏
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">本职知识程度 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.jobEpisteme" value="excellent"
                           <s:if test="#request.interviewRetrial.jobEpisteme != null && #request.interviewRetrial.jobEpisteme.toString() == 'excellent'">checked="checked" </s:if> />
                极丰富
            </label> <label> <input type="radio" name="interviewRetrial.jobEpisteme" value="good"
                                    <s:if test="#request.interviewRetrial.jobEpisteme != null && #request.interviewRetrial.jobEpisteme.toString() == 'good'">checked="checked" </s:if>/>
            很丰富
        </label> <label> <input type="radio" name="interviewRetrial.jobEpisteme" value="average"
                                <s:if test="#request.interviewRetrial.jobEpisteme != null && #request.interviewRetrial.jobEpisteme.toString() == 'average'">checked="checked" </s:if>/>
            一般
        </label> <label> <input type="radio" name="interviewRetrial.jobEpisteme" value="less"
                                <s:if test="#request.interviewRetrial.jobEpisteme != null && #request.interviewRetrial.jobEpisteme.toString() == 'less'">checked="checked" </s:if>/>
            稍差
        </label> <label> <input type="radio" name="interviewRetrial.jobEpisteme" value="poor"
                                <s:if test="#request.interviewRetrial.jobEpisteme != null && #request.interviewRetrial.jobEpisteme.toString() == 'poor'">checked="checked" </s:if>/>
            缺乏
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">学经历与本职适合度 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.jobExperience" value="excellent"
                           <s:if test="#request.interviewRetrial.jobExperience != null && #request.interviewRetrial.jobExperience.toString() == 'excellent'">checked="checked" </s:if>/>
                极适合
            </label> <label> <input type="radio" name="interviewRetrial.jobExperience" value="good"
                                    <s:if test="#request.interviewRetrial.jobExperience != null && #request.interviewRetrial.jobExperience.toString() == 'good'">checked="checked" </s:if>/>
            很适合
        </label> <label> <input type="radio" name="interviewRetrial.jobExperience" value="average"
                                <s:if test="#request.interviewRetrial.jobExperience != null && #request.interviewRetrial.jobExperience.toString() == 'average'">checked="checked" </s:if>/>
            可接受
        </label> <label> <input type="radio" name="interviewRetrial.jobExperience" value="less"
                                <s:if test="#request.interviewRetrial.jobExperience != null && #request.interviewRetrial.jobExperience.toString() == 'less'">checked="checked" </s:if>/>
            勉强
        </label> <label> <input type="radio" name="interviewRetrial.jobExperience" value="poor"
                                <s:if test="#request.interviewRetrial.jobExperience != null && #request.interviewRetrial.jobExperience.toString() == 'poor'">checked="checked" </s:if>/>
            不适合
        </label>
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">技能熟练度 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.proficiency" value="excellent"
                           <s:if test="#request.interviewRetrial.proficiency !=null && #request.interviewRetrial.proficiency.toString() == 'excellent'">checked="checked" </s:if>/>
                熟手
            </label> <label> <input type="radio" name="interviewRetrial.proficiency" value="good"
                                    <s:if test="#request.interviewRetrial.proficiency !=null && #request.interviewRetrial.proficiency.toString() == 'good'">checked="checked" </s:if>/>
            生手
        </label> <label> <input type="radio" name="interviewRetrial.proficiency" value="average"
                                <s:if test="#request.interviewRetrial.proficiency !=null && #request.interviewRetrial.proficiency.toString() == 'average'">checked="checked" </s:if>/>
            时装熟手
        </label> <!-- <label> <input type="radio" name="interviewRetrial.proficiency" value="less"
                                <s:if test="#request.interviewRetrial.proficiency !=null && #request.interviewRetrial.proficiency.toString() == 'less'">checked="checked" </s:if>/>
            排花熟手
        </label> <label> <input type="radio" name="interviewRetrial.proficiency" value="poor"
                                <s:if test="#request.interviewRetrial.proficiency !=null && #request.interviewRetrial.proficiency.toString() == 'poor'">checked="checked" </s:if>/>
            不适合
        </label> -->
        </div>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">对应征人员之综合评语
        <em>*</em>
    </label>

    <div class="form-input form-textarea">
        <textarea id="retrial_appraise" name="interviewRetrial.appraise" required="required" rows="5"
                  placeholder="请填写综合评语">${interviewRetrial.appraise}</textarea>
    </div>

</div>
<div class="clearfix">

    <label class="form-label">综合考虑结果 <em>*</em></label>

    <div class="form-input">
        <div class="radiogroup">
            <label> <input type="radio" name="interviewRetrial.appraiseResult" value="own_appointment"
                           <s:if test="#request.interviewRetrial.appraiseResult != null && #request.interviewRetrial.appraiseResult.toString() == 'own_appointment'">checked="checked" </s:if>/>
                本职任用
            </label> <label> <input type="radio" name="interviewRetrial.appraiseResult" value="advice_job"
                                    <s:if test="#request.interviewRetrial.appraiseResult != null && #request.interviewRetrial.appraiseResult.toString() == 'advice_job'">checked="checked" </s:if>/>
            建议岗位
        </label> <label> <input type="radio" name="interviewRetrial.appraiseResult" value="turn_pool"
                                <s:if test="#request.interviewRetrial.appraiseResult != null && #request.interviewRetrial.appraiseResult.toString() == 'turn_pool'">checked="checked" </s:if>/>
            转人才库
        </label> <label> <input type="radio" name="interviewRetrial.appraiseResult" value="deleted_directly"
                                <s:if test="#request.interviewRetrial.appraiseResult != null && #request.interviewRetrial.appraiseResult.toString() == 'deleted_directly'">checked="checked" </s:if>/>
            直接删除
        </label>
        </div>
    </div>

</div>


<div class="clearfix">

    <label class="form-label">到岗时间 <em>*</em></label>

    <div class="form-input">
        <fmt:formatDate value="${interviewRetrial.registerDate}" var="receiverDate"
                        pattern="yyyy-MM-dd"></fmt:formatDate>
        <input type="text" id="retrial_rdate" name="retrial_rdate"
               value="${receiverDate}" onclick="WdatePicker()"/>
    </div>

</div>

<div class="clearfix">

    <label class="form-label">选择职等职级</label>

    <div class="form-input">
<%--         <select style="opacity: 0;" id="grade_sel">
            <s:iterator value="#request.grades" var="grade" status="st">
                <s:if test="#request.interviewRetrial.gradeGive == null && #st.index ==0">
                    <option value="${grade.id}" selected="selected">${grade.gradeName}</option>
                </s:if>
                <s:elseif test="#request.interviewRetrial.gradeGive.gradeName == #grade.gradeName">
                    <option value="${grade.id}" selected="selected">${grade.gradeName}</option>
                </s:elseif>
                <s:else>
                    <option value="${grade.id}">${grade.gradeName}</option>
                </s:else>
            </s:iterator>
        </select> --%> <select style="opacity: 0;" id="gradeGive_sel" name="interviewRetrial.gradeGive.id">
        <s:iterator value="#request.gradeRetrialLvs" var="grade" status="st">
            <s:if test="#request.interviewRetrial.gradeGive == null && #st.index ==0">
                <option value="${grade.id}" selected="selected">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
            </s:if>
            <s:elseif test="#request.interviewRetrial.gradeGive.id == #grade.id">
                <option value="${grade.id}" selected="selected">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
            </s:elseif>
            <s:else>
                <option value="${grade.id}">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
            </s:else>
        </s:iterator>
    </select>

    </div>

</div>

<div class="clearfix">

    <label class="form-label">建议职级</label>

    <div class="form-input">
        <select style="opacity: 0;" id="gradeAdvice_sel" name="interviewRetrial.gradeAdvice.id">
            <s:iterator value="#request.gradeRetrialLvs" var="grade" status="st">
                <s:if test="#request.interviewRetrial.gradeAdvice == null && #st.index ==0">
                    <option value="${grade.id}" selected="selected">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
                </s:if>
                <s:elseif test="#request.interviewRetrial.gradeAdvice.id == #grade.id">
                    <option value="${grade.id}" selected="selected">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
                </s:elseif>
                <s:else>
                    <option value="${grade.id}">${grade.duty.organization.path}/${grade.duty.dutyName}/${grade.gradeName}/${grade.gradeSort}</option>
                </s:else>
            </s:iterator>
        </select>
    </div>

</div>
<s:if test="#request.signViewType == \"rv\" && #request.interviewArrangeId > 0">
    <div class="form-action clearfix">
        <button type="button" class="button" onclick="checkInterviewRetrialForm()">提交</button>
        <button type="reset" class="button">重置</button>
    </div>
</s:if>

</form>
</div>

</section>
</section>
</section>
</div>

<div class="clear"></div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#grade_sel").change(function () {
            loadGradeLevelByDutyId(${dutyId}, $("#grade_sel").find("option:selected").text());
        });
    });

    /**
     * 加载职级列表
     */
    function loadGradeLevelByDutyId(dutyId, gradeName) {
        $.ajax({
            type:"POST",
            url:"/ajax/grade_lvlist.xhtml",
            data:{"dutyId":dutyId, "gradeName":gradeName},
            dataType:"json",
            success:function (data) {
                var strHTML = "";
                if (data != null && data.length > 0) {
                    $.each(data, function (i, grade) {
                        strHTML += "<option value=\"" + grade.id + "\"" + (i == 0 ? " selected='selected'" : "") + ">" + grade.gradeSort + "</option>";
                    });
                }
                $("#gradeGive_sel").html("");
                $("#gradeGive_sel").append(strHTML);

                $("#gradeGive_sel").prev().html($("#gradeGive_sel").find("option:selected").text());

                //设置建议岗位
                $("#gradeGive_sel").html("");
                $("#gradeGive_sel").append(strHTML);

                $("#gradeGive_sel").prev().html($("#gradeGive_sel").find("option:selected").text());
            }
        });
    }

    /**
     * 检查初试表单
     */
    function checkInterviewFirstForm() {
        if ($("#first_personality").val().trim() == "") {
            alert("请填写性格测试分数!");
            return;
        }
        if ($("#first_writtenXamination").val().trim() == "") {
            alert("请填写笔试分数!");
            return;
        }

        if ($("input:radio[name='interviewFirst.certificate']:checked").val() == undefined) {
            alert("请选择证件原件核对!");
            return;
        }
        if ($("input:radio[name='interviewFirst.interviewOntime']:checked").val() == undefined) {
            alert("请选择面试时间准时与否!");
            return;
        }
        if ($("input:radio[name='interviewFirst.appearance']:checked").val() == undefined) {
            alert("请选择仪容、礼貌、衣着整洁!");
            return;
        }
        if ($("input:radio[name='interviewFirst.exuberance']:checked").val() == undefined) {
            alert("请选择健康与精神!");
            return;
        }
        if ($("input:radio[name='interviewFirst.enunciation']:checked").val() == undefined) {
            alert("请选择口齿清晰、发音标准!");
            return;
        }

        if ($("#first_appraise").val().trim() == "") {
            alert("请填写评价!");
            return;
        }
        if ($("input:radio[name='interviewFirst.appraiseResult']:checked").val() == undefined) {
            alert("请选择评价结果!");
            return;
        }

        if ($("#first_gv_sel").children().length == 0) {
            alert("无职级选择,请填写该职务下的职级!");
            return;
        }

        //alert($("#post_first_form").serialize());
        var url = "${ctx}/invite/post_firstview.xhtml?dutyId=${dutyId}&organizationId=${organizationId}";
        $.ajax(url, {
            type:"POST",
            data:$("#post_first_form").serialize(),
            dataType:"html",
            cache:false,
            success:function (a) {
                alert("添加面试结果成功！");
                location.href = "${ctx}/index.xhtml#invite/invite_list.xhtml?p=interview_arrange";
            },
            error:function (XMLHttpRequest, textStatus, errorThrown) {
                alert('提交申请发生异常');
            },
            complete:function () {
            }
        });
    }

    /**
     * 检查复试表单
     */
    function checkInterviewRetrialForm() {
        if ($("input:radio[name='interviewRetrial.expression']:checked").val() == undefined) {
            alert("请选择表达程度!");
            return;
        }
        if ($("input:radio[name='interviewRetrial.astute']:checked").val() == undefined) {
            alert("请选择机敏、反应程度!");
            return;
        }
        if ($("input:radio[name='interviewRetrial.emotionality']:checked").val() == undefined) {
            alert("请选择情绪稳定程度!");
            return;
        }
        if ($("input:radio[name='interviewRetrial.selfConfidence']:checked").val() == undefined) {
            alert("请选择自信心程度!");
            return;
        }
        if ($("input:radio[name='interviewRetrial.jobEpisteme']:checked").val() == undefined) {
            alert("请选择本职知识程度!");
            return;
        }
        if ($("input:radio[name='interviewRetrial.jobExperience']:checked").val() == undefined) {
            alert("请选择经历与本职适合度!");
            return;
        }
        if ($("input:radio[name='interviewRetrial.proficiency']:checked").val() == undefined) {
            alert("请选择技能熟练度!");
            return;
        }

        if ($("#retrial_appraise").val().trim() == "") {
            alert("请填写评价!");
            return;
        }
        if ($("input:radio[name='interviewRetrial.appraiseResult']:checked").val() == undefined) {
            alert("请选择综合考虑结果!");
            return;
        }
        if($("#retrial_rdate").val().trim() == ""){
            alert("请填写报到时间!");
            return;
        }

        if ($("#gradeGive_sel").children().length == 0) {
            alert("无职级选择,请填写该职务下的职级!");
            return;
        }

        if ($("#gradeAdvice_sel").children().length == 0) {
            alert("无职级选择,请填写该职务下的职级!");
            return;
        }

        //alert($("#post_form").serialize());
        var url = "${ctx}/invite/post_retrialview.xhtml?dutyId=${dutyId}&organizationId=${organizationId}";
        $.ajax(url, {
            type:"POST",
            data:$("#post_retrial_form").serialize(),
            dataType:"html",
            cache:false,
            success:function (a) {
                alert("添加面试结果成功！");
                location.href = "${ctx}/index.xhtml#invite/invite_list.xhtml?p=interview_arrange";
            },
            error:function (XMLHttpRequest, textStatus, errorThrown) {
                alert('提交申请发生异常');
            },
            complete:function () {
            }
        });
    }

</script>